package com.filepublic.demo.server.mapper;

import com.filepublic.demo.pojo.dto.UserLoginDto;
import com.filepublic.demo.pojo.entity.UserEntity;
import com.filepublic.demo.pojo.query.UserBaseQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

/**
 * 用户表的基本sql
 */
@Mapper
public interface UserBaseMapper {
    /**
     * 基础查询（除了id外的字段）
     * @param userBaseQuery
     * @return
     */
    UserEntity selectUser(UserBaseQuery userBaseQuery);

    /**
     * 基础插入
     * @param userEntity
     */
    void insertUser(UserEntity userEntity);

    /**
     * 通过id查用户
     * @param userId
     * @return
     */
    @Select("select * from email_user where user_id = #{userId}")
    UserEntity selectUserById(@Param("userId") String userId);
}
